﻿using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace CHSystemApi.Framework.Middleware
{
    /// <summary>
    /// 中间件公共范式
    /// </summary>
    public interface IMiddleware
    {
        /// <summary>
        /// 请求委托
        /// </summary>
        RequestDelegate _next { get; set; }

        /// <summary>
        /// 自定义中间件处理过程
        /// </summary>
        /// <param name="httpContext">request上下文</param>
        /// <returns></returns>
        Task InvokeAsync(HttpContext httpContext);
    }
}
